package com.yangaobo.dto;

import com.yangaobo.constant.MC;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Pattern;
import lombok.*;

/**
 * @author 杨奥博
 */

// EqualsAndHashCode 自动生成equals和hashCode方法
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Schema(description = "按条件分页搜索课程DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CoursePageDTO extends PageDTO {
    @Schema(description = "课程名称")
    @Pattern(regexp = MC.Regex.TITLE_RE, message = MC.Regex.TITLE_RE_MSG)
    private String title;

    @Schema(description = "课程类别")
    private String category;
}